<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
            <link rel="stylesheet" href="${request.contextPath}/statics/plugins/sb-admin-2/sb-admin-2.min.css">
            <link rel="stylesheet" href="${request.contextPath}/statics/css/my.css">
            <style>
                .cloak{
                    padding:20px
                }
            </style>
</head>
<body>
<div class="container-fluid nolrpad" id="rrapp">
    <ul id="myTab" class="nav nav-pills">
        <li class="nobtnli"><a href="#opt" data-toggle="tab"><i class="fa fa-user fa-fw"></i> 人员信息录入</a></li>
    </ul>
<div  v-cloak :class="[{'cloak':showList}]">
    <div  v-show="showList">
        <div class="grid-btn">
            <#if shiro.hasPermission("xinpai:users:select")>
                <div class="form-group col-sm-2" style="margin-top:0">
                    <input type="text" class="form-control"  @keyup.enter="query" v-model="q.username" placeholder="姓名或手机号">
                </div>
                <a class="btn btn-default" @click="query">查询</a>
            </#if>
			<#if shiro.hasPermission("xinpai:users:save")>
            <a class="btn btn-info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("xinpai:users:update")>
            <a class="btn btn-info" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("xinpai:users:delete")>
            <a class="btn btn-info" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

  <!--  <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">设备imei号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.imei" placeholder="设备imei号"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">手机号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.mobile" placeholder="手机号"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">用户姓名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.name" placeholder="用户姓名"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">性别</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.sex" placeholder="性别"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">生日</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.birthday" placeholder="生日"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">身份证号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.idCard" placeholder="身份证号"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">职位</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.positionId" placeholder="职位"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">民族</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.volk" placeholder="民族"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">籍贯</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.naivePlace" placeholder="籍贯"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">地址</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.address" placeholder="地址"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">婚姻状况</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.marriage" placeholder="婚姻状况"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">部门</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.deptId" placeholder="部门"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">所属项目</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.projectId" placeholder="所属项目"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">人员状态</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="users.state" placeholder="人员状态"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>-->
</div>
    <div  v-show="!showList" class="panel panel-default">
        <div class="panel-body nopaddingtop">
            <div class="row rowaddcar" style="padding-top: 20px;">
                <br/>
                <div class="col-lg-4">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">门卡IMEI:</label>
                        <input type="text" class="col-md-3 form-control form-inline-opt" v-model="users.imei" placeholder="门卡IMEI"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">联系电话:</label>
                        <input type="text" class="col-md-3 form-control form-inline-opt" v-model="users.mobile" placeholder="联系电话"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">姓 名:</label>
                        <input type="text" class="col-md-3 form-control form-inline-opt" v-model="users.name" placeholder="姓名"/>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="row form-group " >
                        <label class="col-md-3 llabel">性 别:</label>
                        <select class="col-md-3 form-control form-inline form-inline-opt" v-model="users.sex">
                            <option value="0">请选择....</option>
                            <option v-for="item in dict.sex" :value="item.code">{{item.value}}</option>
                        </select>
                    </div>
                </div>
                <div class="form-group col-lg-4">
                    <div class="row " >
                        <label  class="col-md-3 llabel">出生日期:</label>
                        <input type="date" class="form-control form-inline-opt" v-model="users.birthday" placeholder="出生日期"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">身份证号:</label>
                        <input type="text" class="col-md-3 form-control form-inline-opt" v-model="users.idCard" placeholder="身份证号"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group " >
                        <label class="col-md-3 llabel">民 族:</label>
                        <input type="text" class="col-md-3 form-control form-inline-opt" v-model="users.volk" placeholder="民族"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group " >
                        <label class="col-md-3 llabel">籍 贯:</label>
                        <input type="text" class="col-md-3 form-control form-inline-opt" v-model="users.naivePlace" placeholder="籍贯"/>
                    </div>
                </div>
                <div class="form-group col-lg-4">
                    <div class="row " >
                        <label  class="col-md-3 llabel">户口所在地:</label>
                        <input type="text" class="form-control form-inline-opt" v-model="users.address" placeholder="户口所在地"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">婚姻状况:</label>
                        <select class="col-md-3 form-control form-inline form-inline-opt" v-model="users.marriage">
                            <option value="0">请选择....</option>
                            <option v-for="item in dict.marriage" :value="item.code">{{item.value}}</option>
                        </select>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="row form-group " >
                        <label class="col-md-3 llabel">所属部门:</label>
                        <select class="col-md-3 form-control form-inline form-inline-opt" v-model="users.deptId">
                            <option value="0">请选择....</option>
                            <option v-for="item in dict.deptId" :value="item.code">{{item.value}}</option>
                        </select>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="row form-group " >
                        <label class="col-md-3 llabel">职 位:</label>
                        <input type="text" class="form-control form-inline-opt" v-model="users.positionId"/>
                    </div>
                </div>
                <div class="col-lg-4">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">所属项目:</label>
                        <select class="col-md-3 form-control form-inline form-inline-opt" v-model="users.projectId" @change="selectInfo()">
                            <option value="0">请选择....</option>
                            <option v-for="item in projectList" :value="item.pid">{{item.projectName}}</option>
                        </select>
                    </div>
                </div>
                <div class="col-lg-4" v-show="users.projectId>0">
                    <div class="row form-group" >
                        <label class="col-md-3 llabel">所属区域:</label>
                        <div class="col-sm-10">
                            <label class="checkbox-inline" v-for="item in itemList">
                                <input type="checkbox" v-if="item.parentId>0"  :value="item.pid" v-model="users.areaList">{{item.projectName}}
                            </label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-info" @click="saveOrUpdate" :value="title"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </div>
    </div>
</div>
<script src="${request.contextPath}/statics/js/modules/xinpai/users.js?_${.now?long}"></script>
</body>
</html>